package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DispatchTableMonitorMapper;
import com.ruoyi.system.domain.DispatchTableMonitor;
import com.ruoyi.system.service.IDispatchTableMonitorService;

/**
 * 格监控Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class DispatchTableMonitorServiceImpl implements IDispatchTableMonitorService 
{
    @Autowired
    private DispatchTableMonitorMapper dispatchTableMonitorMapper;

    /**
     * 查询格监控
     * 
     * @param monitoringTableId 格监控主键
     * @return 格监控
     */
    @Override
    public DispatchTableMonitor selectDispatchTableMonitorByMonitoringTableId(Long monitoringTableId)
    {
        return dispatchTableMonitorMapper.selectDispatchTableMonitorByMonitoringTableId(monitoringTableId);
    }

    /**
     * 查询格监控列表
     * 
     * @param dispatchTableMonitor 格监控
     * @return 格监控
     */
    @Override
    public List<DispatchTableMonitor> selectDispatchTableMonitorList(DispatchTableMonitor dispatchTableMonitor)
    {
        return dispatchTableMonitorMapper.selectDispatchTableMonitorList(dispatchTableMonitor);
    }

    /**
     * 新增格监控
     * 
     * @param dispatchTableMonitor 格监控
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertDispatchTableMonitor(DispatchTableMonitor dispatchTableMonitor)
    {
        return dispatchTableMonitorMapper.insertDispatchTableMonitor(dispatchTableMonitor);
    }

    /**
     * 修改格监控
     * 
     * @param dispatchTableMonitor 格监控
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateDispatchTableMonitor(DispatchTableMonitor dispatchTableMonitor)
    {
        return dispatchTableMonitorMapper.updateDispatchTableMonitor(dispatchTableMonitor);
    }

    /**
     * 批量删除格监控
     * 
     * @param monitoringTableIds 需要删除的格监控主键
     * @return 结果
     */
    @Override
    public int deleteDispatchTableMonitorByMonitoringTableIds(Long[] monitoringTableIds)
    {
        return dispatchTableMonitorMapper.deleteDispatchTableMonitorByMonitoringTableIds(monitoringTableIds);
    }

    /**
     * 删除格监控信息
     * 
     * @param monitoringTableId 格监控主键
     * @return 结果
     */
    @Override
    public int deleteDispatchTableMonitorByMonitoringTableId(Long monitoringTableId)
    {
        return dispatchTableMonitorMapper.deleteDispatchTableMonitorByMonitoringTableId(monitoringTableId);
    }
}
